package cn.cs.mapper;

import cn.cs.pojo.Product;
import cn.cs.pojo.ProductType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface ProductTypeMapper {

	public ProductType getProductTypeById(@Param(value = "id") String id)throws Exception;

	public List<ProductType> getProductTypeListByMap(Map<String, Object> param)throws Exception;

	public List<ProductType> getProductTypeListByMapPage(Map<String, Object> param)throws Exception;

	public List<ProductType> getTypeTree();

	public Integer getProductTypeCountByMap(Map<String, Object> param)throws Exception;

	public Integer insertProductType(ProductType productType)throws Exception;

	public Integer updateProductType(ProductType productType)throws Exception;

	public Integer deleteProductTypeById(@Param(value = "id") String id)throws Exception;

	public List<ProductType> getAllProType()throws Exception;

	public List<Product> getProByType(Map<String, Object> map)throws Exception;

	public List<Product> getProsBydis(Map<String, Object> param);

	public List<Product> getproBySales(Map<String, Object> param);

	public List<Map<String,Object>> getProTypes();

	public List<Map<String,Object>> getProTypesByPid(String pid);
}
